﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShortestPath
{
    class Program
    {
        static void Main(string[] args)
        {
            int[,] a = new int[6, 6];

            for (int i = 1; i < 6; i++)
                for (int j = 1; j < 6; j++)
                    a[i, j] = int.MaxValue;

            a[1, 2] = 10;
            a[2, 3] = 50;
            a[1, 5] = 100;
            a[1, 4] = 30;
            a[3, 5] = 10;
            a[4, 3] = 20;
            a[4, 5] = 60;

            float[] d = { 0, 0, 0, 0, 0, 0 };
            int[] p = { 0, 0, 0, 0, 0, 0 };


            BBShortest.shortest(1, d, p, a);

            for (int i = 0; i < d.Length; i++)
                Console.WriteLine(d[i]);
            for (int i = 0; i < p.Length; i++)
                Console.WriteLine(p[i]);

            Console.ReadLine();

        }
    }
}
